﻿/// <Summary> 
/// $Author: Nikhil Chinchwade 

/// $Creation Date : 
/// </summary>
using System;
using System.Collections.Generic;
using System.Collections;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using MindTree.PerfWorkbench.Azure.Monitor.Core;

namespace MindTree.PerfWorkbench.Azure.Monitor
{
    /// <summary>
    /// Interaction logic for AzureMonitoringConfig.xaml
    /// </summary>
    public partial class AzureMonitoringConfig : Window
    {

        public static List<GridData> data = new List<GridData>();

        public static List<GridData> ridData
        {
            get
            {
                return data;
            }
            set
            {
                data = value;
            }
        }


        public AzureMonitoringConfig()
        {
            InitializeComponent();

            for (int i = 0; i < 5; i++)
            {
                GridData d = new GridData();
                d.Name = "Name - " + i;
                
                ridData.Add(d);
            }
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            CheckBox chbox = new CheckBox();
            chbox.IsChecked = true;
            
            StackPanel panel = new StackPanel();
            panel.Orientation=Orientation.Horizontal;
            panel.Resources.Add(1,chbox);

            DataTemplate template = new DataTemplate();
            template.Resources.Add(2, panel);

            foreach (int key in AzureMonInstanceContext.ConfigCountersets.CtrSets.Keys)
            {
                GridViewColumn col = new GridViewColumn();              
                
                col.Header = AzureMonInstanceContext.ConfigCountersets.CtrSets[key].Name;
                col.CellTemplate = template;
                ConfigGridView.Columns.Add(col);
                //col.DisplayMemberBinding = new CheckBox();
            }
            DynColumns.DataContext = ridData;
            
        }
    }

    public class GridData
    {
        public string Name;

    }
}
